# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Firmicus <francois.archlinux.org>

pkgname=ttf-junicode
pkgver=1.002
pkgrel=1
pkgdesc='Junius-Unicode: Font for medievalists'
url='http://junicode.sourceforge.net'
license=('custom:OFL')
arch=('any')
makedepends=('poppler')
depends=('xorg-fonts-encodings' 'xorg-fonts-alias' 'xorg-font-utils' 'fontconfig')
source=("https://downloads.sourceforge.net/junicode/junicode-${pkgver}.zip"
        'LICENSE')
sha256sums=('c199d96c8424be60fcab8d00d2eee39ea8ae632cfd5e710cbbd70626d6a729e7'
            'ca122f3bda0154f692817450168cb650a7fc59ef96c93582acd2e7a744d464d3')

install=install

package() {
	cd "${srcdir}"
	install -m755 -d "${pkgdir}/usr/share/"{fonts/TTF,{doc,licenses}/${pkgname}}

	install -m644 *.ttf "${pkgdir}/usr/share/fonts/TTF"
	install -m644 doc/Junicode.pdf "${pkgdir}/usr/share/doc/${pkgname}"
	ln -s "../../doc/${pkgname}/Junicode.pdf" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
